<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/8/9 0009
 * Time: 上午 10:06
 */
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use yii\bootstrap\Modal;//弹窗引用类
use kartik\select2\Select2;
use yii\web\JsExpression;

use app\themes\adminlte2\AppAsset;
use yii\widgets\Alert;

?>
<?php
AppAsset::register($this);

?>

<div id="myfirstchart" style="height: 300px;"></div>

<?php
$js = <<<JS

new Morris.Bar({
  // 用来绘制图表的元素的ID
  element: 'myfirstchart',
  resize: true,
  // 图表数据记录——这个数组中的每个条目对应于图表上的一个点。
  data: [
		  {"period": "2011 Q3", "licensed": 3407, "sorned": null},
		  {"period": "2011 Q2", "licensed": 3351, "sorned": null},
		  {"period": "2011 Q1", "licensed": 3269, "sorned": null},
		  {"period": "2010 Q4", "licensed": 3246, "sorned": null},
		  {"period": "2010 Q3", "licensed": 3257, "sorned": null},
		  {"period": "2010 Q2", "licensed": 3248, "sorned": null},
		  {"period": "2010 Q1", "licensed": 3171, "sorned": null},
		  {"period": "2009 Q4", "licensed": 3171, "sorned": null},
		  {"period": "2009 Q3", "licensed": 3201, "sorned": null},
		  {"period": "2009 Q2", "licensed": 3215, "sorned": null},
		  {"period": "2009 Q1", "licensed": 3148, "sorned": null},
		  {"period": "2008 Q4", "licensed": 3155, "sorned": null},
		  {"period": "2008 Q3", "licensed": 3190, "sorned": null},
		  {"period": "2007 Q4", "licensed": 3226, "sorned": null},
		  {"period": "2006 Q4", "licensed": 3245, "sorned": null},
		  {"period": "2005 Q4", "licensed": 3289, "sorned": null},
		  {"period": "2004 Q4", "licensed": 3263, "sorned": null},
		  {"period": "2003 Q4", "licensed": 3189, "sorned": null},
		  {"period": "2002 Q4", "licensed": 3079, "sorned": null},
		  {"period": "2001 Q4", "licensed": 3085, "sorned": null},
		  {"period": "2000 Q4", "licensed": 3055, "sorned": null},
		  {"period": "1999 Q4", "licensed": 3063, "sorned": null},
		  {"period": "1998 Q4", "licensed": 2943, "sorned": null},
		  {"period": "1997 Q4", "licensed": 2806, "sorned": null},
		  {"period": "1996 Q4", "licensed": 2674, "sorned": null},
		  {"period": "1995 Q4", "licensed": 1702, "sorned": null},
		  {"period": "1994 Q4", "licensed": 1732, "sorned": null}
		],


        barColors: ['#00a65a', '#f56954'],

      xkey: 'period',
      ymax: 'auto 4000',
      ykeys: ['licensed', 'sorned'],
      labels: ['Licensed', 'SORN'],
      units: '',
        labels: ['面积', '价格'],
        hideHover: 'true',
        hoverFillColor:'#00a65a'

});
JS;
$this->registerJs($js);

?>
